file = open('../2.txt', 'r', encoding='utf-8')

lines = file.readlines()

n = 0

res = []
tmp = ''
tlist = []

def is_chinese(string):
    """
    检查整个字符串是否包含中文
    :param string: 需要检查的字符串
    :return: bool
    """
    for ch in string:
        if u'\u4e00' <= ch <= u'\u9fff':
            return True

    return False

for line in lines:
    line = line.strip()
    if '#' in line:
        continue
    if tmp == '':
        tmp = line
    else:
        if is_chinese(tmp) and is_chinese(line):
            print('========================')
            print(res)
            print(n * 2)
            print(tmp, line)
            exit(0)
        if not is_chinese(tmp):
            res.append('\n'.join([line, tmp]))
        else:
            res.append('\n'.join([tmp, line]))
        tmp = ''
        tlist = []
        n = n + 1
        print(n)
print(res)


file = open('../output.txt', 'w', encoding='utf-8')
file.write('\n'.join(res))